home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-01 | 6.3 KB | 174 lines | [TEXT/MPS ] |
- {
- File: Appearance.p
-
- Contains: Appearance Manager Interfaces.
-
- Version: Technology: System 8
- Release: Universal Interfaces 3.0d3 on Copland DR1
-
- Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- }
- {$IFC UNDEFINED UsingIncludes}
- {$SETC UsingIncludes := 0}
- {$ENDC}
-
- {$IFC NOT UsingIncludes}
- UNIT Appearance;
- INTERFACE
- {$ENDC}
-
- {$IFC UNDEFINED __APPEARANCE__}
- {$SETC __APPEARANCE__ := 1}
-
- {$I+}
- {$SETC AppearanceIncludes := UsingIncludes}
- {$SETC UsingIncludes := 1}
-
- {$IFC UNDEFINED __QUICKDRAW__}
- {$I Quickdraw.p}
- {$ENDC}
- {$IFC UNDEFINED __TYPES__}
- {$I Types.p}
- {$ENDC}
-
- {$PUSH}
- {$ALIGN MAC68K}
- {$LibExport+}
-
- {$IFC FOR_SYSTEM8_COOPERATIVE }
- { Appearance Manager Error Codes (will move to Errors.i) -4200 through -4249 }
-
- CONST
- appearanceBadPatternIndexErr = -4201; { pattern index invalid }
-
- {
- * System Pattern (PixPat) Indices for GetThemePixPat and SetThemePen
- }
- kThemeGrowIconBorderPattern = 1; { Windows }
- kThemeRootMenuBackgroundPattern = 2; { Menus }
- kThemeSelectedRootMenuBackgroundPattern = 3;
- kThemeDisabledRootMenuBackgroundPattern = 4;
- kThemeMenuBackgroundPattern = 5;
- kThemeSelectedMenuBackgroundPattern = 6;
- kThemeDisabledMenuBackgroundPattern = 7;
- kThemeActivePushButtonBackgroundPattern = 8; { Controls }
- kThemePressedPushButtonBackgroundPattern = 9;
- kThemeInactivePushButtonBackgroundPattern = 10;
- kThemeActiveOffIconButtonBackgroundPattern = 11;
- kThemeActiveOnIconButtonBackgroundPattern = 12;
- kThemePressedOffIconButtonBackgroundPattern = 13;
- kThemePressedOnIconButtonBackgroundPattern = 14;
- kThemeMixedIconButtonBackgroundPattern = 15;
- kThemeInactiveIconButtonBackgroundPattern = 16;
- kThemeActivePopupButtonBackgroundPattern = 17;
- kThemePressedPopupButtonBackgroundPattern = 18;
- kThemeInactivePopupButtonBackgroundPattern = 19;
- kThemeActiveDialogBackgroundPattern = 20; { Dialogs }
- kThemeInactiveDialogBackgroundPattern = 21;
- kThemeActiveAlertBackgroundPattern = 22;
- kThemeInactiveAlertBackgroundPattern = 23;
- kThemeActiveModelessDialogBackgroundPattern = 24;
- kThemeInactiveModelessDialogBackgroundPattern = 25;
- kThemeObjectFocusPattern = 26;
- kThemeActiveWindowHeaderBackgroundPattern = 27; { Primitives }
- kThemeInactiveWindowHeaderBackgroundPattern = 28;
- kThemeFinderListViewSortColumnPattern = 29; { Finder }
- kThemeFinderListViewBackgroundPattern = 30;
- kThemeFinderListViewSeparatorLinePattern = 31;
- kThemeFinderWindowBackgroundPattern = 32;
- kThemeUtilityWindowBackgroundPattern = 33; { Miscellaneous }
- kThemeStatusBarBackgroundPattern = 34;
- kThemeInactiveStatusBarBackgroundPattern = 35;
- kThemeDragHilitePattern = 36; { Drag Mgr }
-
- {
- * System Text and other RGBColor Indices for GetThemeColor and SetThemeFore/BackColor.
- }
- kThemeActiveDocumentWindowTitleColor = 1; { Windows }
- kThemeInactiveDocumentWindowTitleColor = 2;
- kThemeActiveMovableModalWindowTitleColor = 3;
- kThemeInactiveMovableModalWindowTitleColor = 4;
- kThemeActiveFloatingWindowTitleColor = 5;
- kThemeInactiveFloatingWindowTitleColor = 6;
- kThemeActiveDrawerWindowTitleColor = 7;
- kThemeInactiveDrawerWindowTitleColor = 8;
- kThemeRootMenuTextColor = 9; { Menus }
- kThemeSelectedRootMenuTextColor = 10;
- kThemeDisabledRootMenuTextColor = 11;
- kThemeMenuTextColor = 12;
- kThemeSelectedMenuTextColor = 13;
- kThemeDisabledMenuTextColor = 14;
- kThemeActivePushButtonTextColor = 15; { Controls }
- kThemePressedPushButtonTextColor = 16;
- kThemeInactivePushButtonTextColor = 17;
- kThemeActivePopupLabelTextColor = 18;
- kThemeInactivePopupLabelTextColor = 19;
- kThemeActivePopupArrowColor = 20;
- kThemePressedPopupArrowColor = 21;
- kThemeInactivePopupArrowColor = 22;
- kThemeActiveDialogTextColor = 23; { Dialogs }
- kThemeInactiveDialogTextColor = 24;
- kThemeActiveAlertTextColor = 25;
- kThemeInactiveAlertTextColor = 26;
- kThemeActiveModelessDialogTextColor = 27;
- kThemeInactiveModelessDialogTextColor = 28;
- kThemeActiveWindowHeaderTextColor = 29; { Primitives }
- kThemeInactiveWindowHeaderTextColor = 30;
- kThemeIconLabelTextColor = 31; { Finder }
- kThemeIconLabelBackgroundColor = 32;
- kThemeFinderListViewTextColor = 33;
- kThemeAppleGuideCoachmarkColor = 34; { Miscellaneous }
- kThemeChasingArrowsColor = 35;
- kThemeStatusBarTextColor = 36;
- kThemeInactiveStatusBarTextColor = 37;
-
- {
- * System Appearance Information
- }
- {
- System Patterns
- *
- * WARNING: Patterns returned by GetThemePixPat are shared by the system and other
- * running applications. These patterns are updated by the system automatically
- * whenever the theme changes. They are system-owned and must not be disposed.
- * Never dispose a PixPatHandle obtained from GetThemePixPat or the system will crash.
- }
- FUNCTION GetThemePixPat(patternIndex: SInt16; VAR pixPat: PixPatHandle): OSStatus;
- FUNCTION SetThemePen(patternIndex: SInt16): OSStatus;
- { System colors }
- FUNCTION SetThemeForeColor(foreColorIndex: SInt16): OSStatus;
- FUNCTION SetThemeBackColor(backColorIndex: SInt16): OSStatus;
- FUNCTION GetThemeColor(colorIndex: SInt16; VAR color: RGBColor): OSStatus;
- {
- * Appearance Drawing Primitives
- }
- FUNCTION DrawThemePrimaryGroup({CONST}VAR rect: Rect; isActive: BOOLEAN): OSStatus;
- FUNCTION DrawThemeSecondaryGroup({CONST}VAR rect: Rect; isActive: BOOLEAN): OSStatus;
- FUNCTION DrawThemeSeparator({CONST}VAR rect: Rect; isActive: BOOLEAN): OSStatus;
- FUNCTION DrawThemeWindowHeader({CONST}VAR rect: Rect; isActive: BOOLEAN): OSStatus;
- FUNCTION DrawThemePlacard({CONST}VAR rect: Rect; isActive: BOOLEAN): OSStatus;
- FUNCTION DrawThemeDialogFrame({CONST}VAR rect: Rect; isActive: BOOLEAN): OSStatus;
- FUNCTION DrawThemeTextBoxFrame({CONST}VAR textBoxRect: Rect; isActive: BOOLEAN): OSStatus;
- FUNCTION DrawThemeTextBoxFocus({CONST}VAR textBoxRect: Rect; hasFocus: BOOLEAN): OSStatus;
- FUNCTION DrawThemeListBoxFrame({CONST}VAR listBoxRect: Rect; isActive: BOOLEAN): OSStatus;
- FUNCTION DrawThemeListBoxFocus({CONST}VAR listBoxRect: Rect; hasFocus: BOOLEAN): OSStatus;
- FUNCTION DrawThemeGenericFocus({CONST}VAR focusRect: Rect; hasFocus: BOOLEAN): OSStatus;
- {$ENDC}
- {$ALIGN RESET}
- {$POP}
-
- {$SETC UsingIncludes := AppearanceIncludes}
-
- {$ENDC} {__APPEARANCE__}
-
- {$IFC NOT UsingIncludes}
- END.
- {$ENDC}
-